package com.hytc.mymall.utils;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.List;

public abstract class CommonAdapter<T>
  extends BaseAdapter
{
  protected Context mContext;
  protected List<T> mDatas;
  protected LayoutInflater mInflater;
  protected int mlayoutId;
  
  public CommonAdapter(Context paramContext, List<T> paramList, int paramInt)
  {
    this.mContext = paramContext;
    this.mDatas = paramList;
    this.mlayoutId = paramInt;
    this.mInflater = LayoutInflater.from(paramContext);
  }
  
  public abstract void convert(ViewHolder paramViewHolder, T paramT);
  
  public int getCount()
  {
    return this.mDatas.size();
  }
  
  public T getItem(int paramInt)
  {
    return this.mDatas.get(paramInt);
  }
  
  public long getItemId(int paramInt)
  {
    return paramInt;
  }
  
  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ViewHolder localViewHolder = ViewHolder.get(this.mContext, paramView, paramViewGroup, this.mlayoutId, paramInt);
    convert(localViewHolder, getItem(paramInt));
    return localViewHolder.getConvertView();
  }
}



/* Location:           C:\Users\Joker\Desktop\classes_dex2jar.jar

 * Qualified Name:     com.sz.ydgy.utils.CommonAdapter

 * JD-Core Version:    0.7.0.1

 */